package com.thread;

public class MyConnection2 {
    private static MyConnection2 myConnection2;
    private  MyConnection2(){}
    public synchronized static MyConnection2 getConnection()
    {
        if (myConnection2==null)
        {
            myConnection2=new MyConnection2();
        }
        return  myConnection2;
    }
}
